package com.maint.m.data


import com.rokid.security.phone.sdk.base.utils.other.ktx.call
import kotlinx.coroutines.flow.MutableStateFlow

/**
 * Created by wjm on 2025/8/7
 */
object GlobalData {
    val p2pConnectState= MutableStateFlow(false)
    val btConnectState = MutableStateFlow(false)
    val sdkInitState = MutableStateFlow(false)

    fun setP2pConnectState(state :Boolean){
        p2pConnectState.call(state)
    }

    fun setBtConnectState(state :Boolean){
        btConnectState.call(state)
    }

    fun isGlassConnect(): Boolean{
        return p2pConnectState.value && btConnectState.value
    }

    fun setSdkInitState(state :Boolean){
        sdkInitState.call(state)
    }
}